<template>
    <div class="box">
        <h1>组件间通信: $attrs与$listeners</h1>
        <h2>需求: 自定义带Hover提示的按钮(使用element ui封装)</h2>
    
        <HintButton
            class="btn" id="btn2" style="width: 200px;"
            type="primary" size="mini" icon="el-icon-edit" content="编辑"
            @click="hbtnHandler"
            @xxx="xxxHandler"
        ></HintButton>
        

        <!-- <HintButton type="danger" size="default" icon="el-icon-delete" content="删除"></HintButton> -->

    </div>
</template>

<script>
import HintButton from './HintButton.vue';
export default {
    name: "AttrsListenersTest",
    components: { HintButton },
    methods: {
        hbtnHandler(e) {
            console.log('i love you', e)
        },
        xxxHandler() {
            console.log('xxx事件')
        }
    }
}
</script>

<style scoped>

</style>